package com.fastloan.common.excel;

import java.util.Set;
import java.util.TreeSet;

/**
 * Created by gelon on 2017/10/18.
 * sheet
 */
public class Sheet {

    public String name ;

    Set<Form> treeSetSort = new TreeSet<>((fir, sec) -> {
        if(fir.startRow > sec.startRow){
            return 1 ;
        }else if(fir.startRow < sec.startRow){
            return -1 ;
        }else{
            if(fir.startColumn > sec.startColumn){
                return 1 ;
            }else if(fir.startColumn < sec.startColumn){
                return -1 ;
            }else {
                return 0 ;
            }
        }

    });

    public Sheet(String name) {
        this.name = name;
    }

    void push(Form form){
        treeSetSort.add(form);
    }

}
